<table ng-controller="FlavorsTableController as table"
       hz-table ng-cloak
       st-table="table.iflavors"
       st-safe-src="table.flavors"
       default-sort="ram"
       default-sort-reverse="false"
       class="table-striped table-rsp table-detail modern">

  <thead>

    <tr>
      <th colspan="100" class="search-header">
        <hz-search-bar group-classes="input-group-sm" icon-classes="fa-search">
        </hz-search-bar>
      </th>
    </tr>

    <tr>
      <th class="select-col">
        <input type="checkbox" hz-select-all="table.iflavors">
      </th>
      <th class="rsp-p1" st-sort="name" translate>Flavor Name</th>
      <th class="rsp-p1" st-sort="vcpus" translate>VCPUs</th>
      <th class="rsp-p1" st-sort="ram" st-sort-default="ram" translate>RAM</th>
      <th class="rsp-p2" st-sort="disk" translate>Root Disk</th>
      <th class="rsp-p2" st-sort="ephermal" translate>Ephemeral Disk</th>
      <th class="rsp-p2" st-sort="swap" translate>Swap Disk</th>
      <th class="rsp-p2" st-sort="id" translate>ID</th>
      <th class="rsp-p2" st-sort="is_public" translate>Public</th>
      <th class="rsp-p2" st-sort="metadata" translate>Metadata</th>
      <th class="rsp-p2"></th>
    </tr>

  </thead>

  <tbody>
    <tr ng-repeat="flavor in table.iflavors track by flavor.id">
      <td class="select-col">
        <input type="checkbox"
               ng-model="selected[flavor.id].checked"
               hz-select="flavor">
      </td>
      <td class="rsp-p1">{$ flavor.name $}</td>
      <td class="rsp-p1">{$ flavor.vcpus $}</td>
      <td class="rsp-p1">{$ flavor.ram | mb $}</td>
      <td class="rsp-p2">{$ flavor.disk | gb $}</td>
      <td class="rsp-p2">{$ flavor.ephemeral | gb $}</td>
      <td class="rsp-p2">{$ flavor.swap | mb $}</td>
      <td class="rsp-p2">{$ flavor.id $}</td>
      <td class="rsp-p2">{$ flavor.is_public | yesno $}</td>
      <td class="rsp-p2">{$ flavor.extras | hasExtras | yesno $}</td>
      <td class="rsp-p2">
      </td>
    </tr>
  </tbody>

  <tfoot hz-table-footer items="table.iflavors"></tfoot>

</table>
